import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
// 导入全局样式表
import './assets/css/global.css'
import './assets/fonts/iconfont.css'
import echarts from 'echarts'

import axios from 'axios'
// 配置请求的根路径--独立后端
axios.defaults.baseURL = 'http://103.46.128.41:22589/'
// axios.defaults.baseURL = 'http://localhost:6543/'
// axios.defaults.baseURL = 'http://localhost:8080/'// 返回测试的后端
axios.interceptors.request.use(config => {
  // console.log(config)
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
})
Vue.prototype.$http = axios

Vue.config.productionTip = true

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
Vue.prototype.$echarts = echarts
Vue.use(echarts)
